import wsgiref.handlers
from pyamf.remoting.gateway.wsgi import WSGIGateway


from services import EchoService
from services import PlaylistUtils
from services import SongUtils
from services import LogService
from services import FriendsSuggestionUtils
from services import YoutubeUtils
from services import PropertiesUtils

# Service mappings
s = {
	'EchoService': EchoService.EchoService,
    'PlaylistUtils': PlaylistUtils.PlaylistUtils,
    'SongUtils': SongUtils.SongUtils,
	'LogService': LogService.LogService,
	'YoutubeUtils': YoutubeUtils.YoutubeUtils,
    'FriendsSuggestionUtils':FriendsSuggestionUtils.FriendsSuggestionUtils,
    'PropertiesUtils':PropertiesUtils.PropertiesUtils,
    }

def main():
    application = WSGIGateway(s)
    wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__':
    main()